<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.common.ValueMaping" %>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<TITLE>
	i友邻社区_照片_${myfn:getFileInfo(theForm.picName)}
	</TITLE>
	<link href="${cpath}/css/youlin.css" rel="stylesheet" type="text/css" media="all" />
	<SCRIPT type=text/javascript src="${cpath}/js/picloop.js"></SCRIPT>
	<link  href="${cpath}/css/pop.css" rel="stylesheet" type="text/css">
	<SCRIPT src="${cpath}/js/global.js" type=text/javascript></SCRIPT>

</head>
<body>
<script>
	function change_width(img_name,wid,hei)
	{
		var CurImage=new Image();
		if(CurImage.src!=img_name.src)
		{
			CurImage.src=img_name.src;
		}
		var img_width = CurImage.width;
		var img_height = CurImage.height;
		img_name.width = img_width;
		img_name.height = img_height;

		if(img_height/hei > img_width/wid)
		{
			if( img_height > hei)
			{
				img_name.width = img_name.width/img_name.height*hei;
				img_name.height = hei;
			}
		}
		else
		{
			if( img_width > wid)
			{
				img_name.height = img_name.height/img_name.width*wid;
				img_name.width = wid;
			}
		}
		return true;
	}
</script>
<!--外套 start -->
<div class="wrap">
  <!--页首 start -->
	<%@ include file="/menu.jsp"%>
  <!--页首 end -->  
  
  <!--导航面包屑 start -->
  <div class="breadCrumb">
  <div class="breadCrumbNav">当前位置：<a href="${cpath}/users.do?action=main">我的主页</a> >>  <a > 照片浏览</a></div>
	<%@ include file="/navf.jsp"%>
 </div> 
  <!--导航面包屑 end -->
  
  <!--主体 start -->
 <div class="body">
 
  <div class="hotBox1">  
    <div class="hotBox1-left">    
	<c:if test="${theForm.qryGroupID != 99999999}">
	  <a href="${cpath}/group_get/groupID_${theForm.qryGroupID}.html"><img src="${cpath}/${myfn:getGroupPic(theForm.qryGroupID)}"  width="75" height="75" class="shequ icon user_icon_2"></a>
      <p><b><a href="${cpath}/group_get/groupID_${theForm.qryGroupID}.html">${myfn:getGroupName(theForm.qryGroupID)}</a></b></p>
	</c:if>
	<c:if test="${theForm.qryGroupID == 99999999}">
	  <a href="${cpath}/users.do?action=home&userID=${theForm.userID}"><img src="${cpath}/${myfn:getUserPic(theForm.userID)}"  width="75" height="75" class="shequ icon user_icon_2"></a>
      <p><b>我的照片</b></p>
	</c:if>
    <p>相册：<a href="${cpath}/gpic.do?action=adlist&qryGAlbumID=${albumForm.galbumID}">${albumForm.albumname}</a></p>
    <p class="lineColor1">全部相片有 ${albumForm.num} 张</p>
    
	</div>
    <div class="hotBox1-right">
      <p class="lineColor1"><a href="javascript:openNewDiv('email');">不良信息举报</a></p>
	  <c:if test="${theForm.qryGroupID != 99999999 && myfn:groupAddFlag(theForm.qryGroupID,userID) == 1
		|| theForm.qryGroupID == 99999999 && albumForm.userID == userID}">		  
	  <p><a href="${cpath}/gpic.do?action=addPage&qryGroupID=${theForm.qryGroupID}&galbumID=${albumForm.galbumID}"><img src="${cpath}/images/icon_26.gif" width="177" height="58" /></a></p>   
	  </c:if>
    </div>
  </div>
   
<div class="left-Box6">
  <h3>我的相册</h3>
  <div class="left-Box6-content">
    <div class="pic">
      <div class="pic_current"><IMG id="albums" src="${cpath}/${myfn:getBigPic(theForm.picName)}"  onload="change_width(this,811,514)"></div>
      <div class="pic_control">

		<c:if test="${theForm.isExPrev == '1' && theForm.isExNext == '1' }">				
			<A id="preLink" href="${cpath}/gpic_views/qryGpicID_${list[0].gpicID}_qryGAlbumID_${list[0].galbumID}.html"><IMG border=0 src="${cpath}/icon/icon0312_26.gif" width=24 height=24></A>
	        <span class="w50"></span>
			<A id="nextLink" href="${cpath}/gpic_views/qryGpicID_${list[2].gpicID}_qryGAlbumID_${list[2].galbumID}.html"><IMG border=0 src="${cpath}/icon/icon0312_28.gif" width=24 height=24></A>
		</c:if>
		<c:if test="${theForm.isExPrev != '1' && theForm.isExNext == '1' }">				
			<A id="preLink"  href="#"><IMG border=0 src="${cpath}/icon/icon0312_262.gif" width=24 height=24></A>
	        <span class="w50"></span>
			<A id="nextLink" href="${cpath}/gpic_views/qryGpicID_${list[1].gpicID}_qryGAlbumID_${list[1].galbumID}.html"><IMG border=0 src="${cpath}/icon/icon0312_28.gif" width=24 height=24></A>
		</c:if>
		<c:if test="${theForm.isExPrev == '1' && theForm.isExNext != '1' }">				
			<A id="preLink" href="${cpath}/gpic_views/qryGpicID_${list[0].gpicID}_qryGAlbumID_${list[0].galbumID}.html"><IMG border=0 src="${cpath}/icon/icon0312_26.gif" width=24 height=24></A>
	        <span class="w50"></span>
			<A id="nextLink" href="#"><IMG border=0 src="${cpath}/icon/icon0312_282.gif" width=24 height=24></A>
		</c:if>
		<c:if test="${theForm.isExPrev != '1' && theForm.isExNext != '1' }">				
			<A id="preLink" href="#"><IMG border=0 src="${cpath}/icon/icon0312_262.gif" width=24 height=24></A>
	        <span class="w50"></span>
			<A id="nextLink" href="#" ><IMG border=0 src="${cpath}/icon/icon0312_282.gif" width=24 height=24></A>
		</c:if>
		
      </div>
      <div class="pic_desc">
      <p>描述： ${myfn:getFileInfo(theForm.picName)}</p>
      <p>上传： <span class="color_blue1">${myfn:getUserNick(theForm.userID)}</span></p>
      <p>时间： <span class="color_blue1">${myfn:formatDate14(theForm.mtime, "-")}</span></p>
      </div>


 	  <form action="${cpath}/gpic.do" name="theForm"  method="post"  class="pic_from">
     <table class="pic_tbl"width="100%"  align="center" cellpadding="0" cellspacing="0">
		<c:forEach var="dianping" items="${dianpinglist}" varStatus="status"> 
		  <tr>
            <td width="5%" align="center">
			<!--
			<c:if test="${dianping.dtype == '1'}"> 
			<IMG src="${cpath}/icon/thumb_up.gif"  >顶 </c:if>
			<c:if test="${dianping.dtype == '2'}"> 
			<IMG src="${cpath}/icon/thumb_down.gif" >踩</c:if>	
			-->
			${status.count}
			</td>
            <td width="65%">${dianping.dcont}</td>
            <td width="15%"><a href="${cpath}/users_home/userID_${dianping.userID}.html"><img src="${cpath}/${myfn:getUserPic(dianping.userID)}" width="29" height="27"></a>${myfn:getUserNick(dianping.userID)}</td>
            <td width="15%" align="center">${myfn:formatDate14(dianping.mtime, "-")}</td>
          </tr>
 		</c:forEach>
		<c:if test="${theForm.page.totalNum > 0}">
		<tr align="left">   
		 <td colspan="4">
			<input type="hidden" name='qryGroupID'	value='${theForm.qryGroupID}'/>
			<input type="hidden" name='qryGpicID'	value='${theForm.qryGpicID}'/>
			<input type="hidden" name='qryGAlbumID'	value='${theForm.qryGAlbumID}'/>
			<!-- 分页主键 formName字段当前的form名称 -->
			<%@ include file="/jsplib/page.jsp" %>
			<!--隐藏域-->
			<input type="hidden" name='action' value='views'/>
		 </td>
		</tr> 
		</c:if>
        </table>
	  </form>
	  <br>
	  <c:if test="${myfn:groupAddFlag(theForm.qryGroupID,userID) ==  1 || theForm.qryGroupID == '99999999'}">
	  <form action="${cpath}/gdianping.do?action=add" name="dianpingForm"  method="post"  class="pic_from">
		  <div id="dianping" >
			<p><strong>我要评论</strong></p>
			<!--<p>
			  <input type="radio" name='dtype'	value='1' checked/>顶
			  <input type="radio" name='dtype'	value='2'/>踩
			</p>-->
			<p><textarea class="input" name="dcont" cols="" rows=""></textarea></p>
			<p><a href="javascript:doConfirm();"><img src="${cpath}/images/icon_09.gif" width="83" height="22" /></a></p>
				<!--隐藏域-->
				<input type="hidden" name='userID'		value='${userID}'/>
				<input type="hidden" name='groupID'		value='${albumForm.groupID}'/>
				<input type="hidden" name='qryGroupID'	value='${albumForm.groupID}'/>
				<input type="hidden" name='qryGalbumID'	value='${albumForm.galbumID}'/>
				<input type="hidden" name='dtype'		value='1'/>
				<input type="hidden" name='dsort'		value='2'/>
				<input type="hidden" name='dsortID'		value='${theForm.gpicID}'/>
		  </div>
	  </form>
	  </c:if>
    </div>
          
    <div class="clearFloat"></div>
  </div>
</div>
  
    <div class="clearFloat"></div>
 </div> 
 <!--主体 end -->
 
 <!--页脚 start -->
	<%@ include file="/foot.jsp"%>
 <!--页脚 end --> 
</div>
<!--外套 end -->
		<!-- 转发 弹出层 -->
		<DIV class=dragdiv id=email style="DISPLAY:none ">
		<DIV class="otherdiv filterbox">
		<B class=g1></B><B class=g2></B><B class=g3></B><B class=g4></B>
		<DIV class="content filterbox"></DIV>
		<B class=g4></B><B class=g3></B><B class=g2></B><B class=g1></B></DIV>
		<DIV class=otherdivin>
		<H2><SPAN><A title=关闭 style="CURSOR: pointer" onclick="closeMask('email')"><IMG src="${cpath}/icon/icon02.gif"></A></SPAN>举报： </H2>
 		<form action="${cpath}/notadv.do?action=add" name="liuyanForm" id="liuyanForm"  method="post" >
			<DL  id="emaildl">
			<DD><textarea name="content" rows="10" cols="50" >照片ID：${theForm.gpicID}存在不良信息！！</textarea>
			</DD>
			<DD><EM><INPUT type=button class='shortBtn' name=send value="确  定" onclick="javascript:notAdd();">&nbsp;&nbsp;
			<INPUT type=button class='shortBtn'  name=cancel value="取  消" onclick="closeMask('email');"></EM>
			</DD>
			</DL>
			<!--隐藏域-->
			<input type="hidden" name='userID'	value='${userID}'/>
			<input type="hidden" name='nsort'	value='7'/>
			<input type="hidden" name='nsortID' value='${theForm.gpicID}'/>
			<input type="hidden" name='ntype'	value='3'/>
			<input type="hidden" name='title'	value='${username}:投诉照片'/>
		</form>  
		</DIV></DIV><!-- 弹出层结束 -->
</body>
</html>

<!---->
<SCRIPT>
var fid = 618;
var tid = 5225918;
var sid = "dkjsS2";
var page = 1;
var extra = "";
var formhash = "e8441d69";
var referer = "";
var discuz_uid = 0;
var thread_special = 0;
var firststanddisabled = "";
var firststandselect_0 = "";
var firststandselect_1 = "";
var firststandselect_2 = "";
var forum_allowsmilies = 1;
var templatesimg = "http://www.iyoulin.com/images";
var forum_ismoderator = 0;
var allowdelpost = 0;
var allowstickthread = 0;
var thread_price = 0;
var allowrefund = 0;
var forum_modrecommend_sort = "";
var supe_status = 0;
var allowpushthread = "";
var forum_supe_pushsetting_status = "";
var thread_supe_pushstatus = 2;
</SCRIPT>

<SCRIPT type=text/javascript>
j(document).ready(function(){	

	j('#albums').click(function(event){
		imageOnclick(event, '#albums', '#preLink', '#nextLink');	
			}).mousemove(function(event){
			imageOnmousemove(event, '#albums', 1);	
	});

});
</SCRIPT>

<SCRIPT>
		//弹出提示层
		function openNewDiv(_id) 
		{
				var m = "mask";
				if(document.getElementById(m)) document.body.removeChild(document.getElementById(m));
				var newMask = document.createElement("div");
				newMask.id = m;
				newMask.style.position = "absolute";
				newMask.style.zIndex = "1";
				_scrollWidth = Math.max(document.body.scrollWidth,document.documentElement.scrollWidth);
				_scrollHeight = Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
				newMask.style.width = _scrollWidth + "px";
				newMask.style.height = _scrollHeight + "px";
				newMask.style.top = "0px";
				newMask.style.left = "0px";
				newMask.style.background = "#33393C";
				newMask.style.filter = "alpha(opacity=40)";
				newMask.style.opacity = "0.30";
				document.body.appendChild(newMask);
				showDiv = document.getElementById(_id);
				showDiv.style.display = "block";
				showDiv.style.position = "absolute";
				showDiv.style.zIndex = "9999";
				showDivWidth = 488;
				showDivHeight = 314;
				showDiv.style.top = (document.documentElement.scrollTop + document.documentElement.clientHeight/2 - showDivHeight/2) + "px";
				showDiv.style.left = (document.documentElement.scrollLeft + document.documentElement.clientWidth/2 -  showDivWidth/2) + "px";
		}
		function closeMask(_id)
		{
				var m = "mask";
				if(document.getElementById(m)) document.body.removeChild(document.getElementById(m));
				showDiv = document.getElementById(_id);
				showDiv.style.display = "none";
		}

	function disdp(type)
	{

		var form = document.theForm;
		form['dcont'].focus();

		var dtype = form['dtype'];
		dtype.value = type;
		var dcont = form['dcont'];

		if(type == "1"){
			dcont.value = "不错！！！！";
		}else{
			dcont.value = "很差！！！！";		
		}
	}

	function dists()
	{
		if(document.getElementById('tousu').style.display == "none"){
		
			document.getElementById('tousu').style.display = "";
			if(document.getElementById('dianping').style.display == ""){
				document.getElementById('dianping').style.display = "none";
			}
		}else{

			document.getElementById('tousu').style.display = "none";
		}
	}

	function doConfirm()
	{
		var userID = "${userID}";
		if(userID == '' ){
			alert('请登录网站');
			window.location.href ="${cpath}/index.jsp";
			return false;
		}
		var form = document.dianpingForm;

		var dcont = form['dcont'];
		if(dcont.value == null||dcont.value.replace(/(^\s*)|(\s*$)/g,"").length < 1)
  		{
			alert('内容不能为空');
			dcont.select();
			return ;
		}
		if(dcont.value.replace(/(^\s*)|(\s*$)/g,"").length > 2000)
  		{
			alert('内容长度不能大于200');
			dcont.select();
			return ;
		}
		form.submit();
	}

	function notAdd()
	{
		var userID = "${userID}";
		if(userID == '' ){
			alert('请登录网站');
			window.location.href ="${cpath}/index.jsp";
			return false;
		}
		var form = document.liuyanForm;

		var content = form['content'];
		if(content.value == null||content.value.replace(/(^\s*)|(\s*$)/g,"").length < 1)
  		{
			alert('内容不能为空');
			content.select();
			return ;
		}
		if(content.value.replace(/(^\s*)|(\s*$)/g,"").length > 2000)
  		{
			alert('内容长度不能大于2000');
			content.select();
			return ;
		}
		form.submit();
	}

</SCRIPT>
